package com.ubireality.module.player;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.ubireality.module.basic.BaseEntity;
import com.ubireality.module.patronus.Bestiary;
import com.ubireality.module.patronus.Patron;
import com.ubireality.module.stage.GameStage;

@Entity
@JsonInclude(JsonInclude.Include.NON_NULL)
public class User extends BaseEntity {
	private String name;
	private String deviceId;
	private long currentGold;
	@OneToMany
	private List<Mission> missions;// mission of the current player
	@OneToOne
	private Bestiary bestiary;
	@OneToOne(mappedBy = "player", fetch = FetchType.LAZY)
	private GameStage activeGameStage;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}

	public long getCurrentGold() {
		return currentGold;
	}

	public void setCurrentGold(long currentGold) {
		this.currentGold = currentGold;
	}

	public List<Mission> getMissions() {
		return missions;
	}

	public void setMissions(List<Mission> missions) {
		this.missions = missions;
	}

	public Bestiary getBestiary() {
		return bestiary;
	}

	public void setBestiary(Bestiary bestiary) {
		this.bestiary = bestiary;
	}

	public GameStage getActiveGameStage() {
		return activeGameStage;
	}

	public void setActiveGameStage(GameStage activeGameStage) {
		this.activeGameStage = activeGameStage;
	}
}
